a=['1','2','3','4']

b=[]
for i in a:
    for j in [x for x in a if x!=i]:
        for m in [x for x in a if x!=i and x!=j]:
            b.append(int(i+j+m))
print(b)
print('共计有%s个'%len(b))
